﻿using static Modules.Person.PersonConstants;
using System.ComponentModel.DataAnnotations;
using static Modules.Payroll.PayrollConstants;
using Modules.Person;

namespace ManagementApi.Models.Payroll
{
    public class PayrollEditForm
    {
        /// <summary>
        /// 主键 
        ///</summary>
        [Display(Name = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// 工资单名称 
        ///</summary>
        [Display(Name = "工资单名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Name { get; set; }
        /// <summary>
        /// 项目Id 
        ///</summary>
        [Display(Name = "项目Id")]
        public int? ProjectId { get; set; }
        /// <summary>
        /// 开始日期 
        ///</summary>
        [Display(Name = "开始日期")]
        [Required(ErrorMessage = "{0}不能为空")]
        public DateTime StartDate { get; set; }
        /// <summary>
        /// 结束日期 
        ///</summary>
        [Display(Name = "结束日期")]
        [Required(ErrorMessage = "{0}不能为空")]
        public DateTime EndDate { get; set; }
        /// <summary>
        /// 企业id 
        ///</summary>
        [Display(Name = "企业id")]
        public int CorpId { get; set; }
        /// <summary>
        /// 企业名称
        ///</summary>
        [Display(Name = "企业名称")]
        public string? CorpName { get; set; }
        /// <summary>
        /// 支付类型 
        ///</summary>
        [Display(Name = "支付类型")]
        [Required(ErrorMessage = "{0}不能为空")]
        public 工资计算方式 PayType { get; set; }
        /// <summary>
        /// 代发月份 
        ///</summary>
        [Display(Name = "代发月份")]
        [Required(ErrorMessage = "{0}不能为空")]
        public int Month { get; set; }
        /// <summary>
        /// 当月计价总额 
        ///</summary>
        [Display(Name = "当月计价总额")]
        public decimal? TotalValuation { get; set; }

        /// <summary>
        /// 工资单类型
        /// </summary>
        [Display(Name="工资单类型")]
        [Required(ErrorMessage = "{0}不能为空")]
        public 工资单类型 WageType { get; set; }
    }
}
